package com.dashu.base.enums.common;

import java.util.HashMap;
import java.util.Map;

public enum PersonalType {

    SCHOOL_NOT_CAMPUS("走读生"),
    SCHOOL_ON_CAMPUS("住校生");


    public String name;

    PersonalType(String name) {
        this.name = name;
    }

    public static final Map<String, PersonalType> map = new HashMap<>();

    static {
        for (PersonalType s : PersonalType.values()) {
            map.put(s.name(), s);
        }
    }

    public static PersonalType getPersonalType(String name) {
        switch (name) {
            case "走读生":
                return SCHOOL_NOT_CAMPUS;
            case "住校生":
                return SCHOOL_ON_CAMPUS;
        }

        return null;
    }
}
